package com.shadow.beanFactoryPostProcessor.test.beanNameGenerator;

import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.beans.factory.support.BeanDefinitionRegistry;
import org.springframework.beans.factory.support.BeanNameGenerator;

import java.util.Random;

/**
 * @author VernHe
 * @date 2021年11月04日 20:13
 */
public class MyBeanNameGenerator2 implements BeanNameGenerator {
	@Override
	public String generateBeanName(BeanDefinition definition, BeanDefinitionRegistry registry) {
		Random random = new Random();
		return random.nextInt(1000) + "BN2";
	}
}
